#!/bin/bash
# ******** 使用的是 CSIG_Mac_Translator_Edu 打包

echo "Flutter iOS Build start ..."
# flutter clean
flutter build ios -v --build-name=1.0.0 --build-number=1 --release

# 生成 .ipa 文件
rm -rf build/ios/iphoneos/ipa/
mkdir -p build/ios/iphoneos/ipa/Payload
cp -R build/ios/iphoneos/Runner.app build/ios/iphoneos/ipa/Payload/
cd build/ios/iphoneos/ipa
zip -r app-release.ipa Payload

cd ../../../../
echo $PWD

echo "构建完成"